﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iLangl.Model;
using iLangl.BusinessModel.Managers;

namespace iLangl.BusinessModel.Actions.Customers
{
	public class GetCustomerSettings : BaseTPAction
	{
		public GetCustomerSettings()
			: base()
		{
			RequestContext = new SettingsForCustomerRequestContext();
		}

		protected override string GetName()
		{
			return "GetCustomerSettings";
		}

		protected override string GetVersion()
		{
			return "1";
		}
		protected override void _execute()
		{
			PluginLicense license = PluginManager.Instance.GetLicense(PluginLiceneKey);

			SettingsForCustomer settings = new SettingsForCustomer();
			settings.Products = ProductManager.Instance.GetProducts();
			settings.WorkAreas = WorkAreaManager.Instance.GetWorkAres();
			RequestContext.SetContext(settings);
		}
	}
}
